<template>
	<cl-page background-color="transparent" :fullscreen="true">
		<view class="page-home">
			<cl-sticky>
				<Topbar></Topbar>
			</cl-sticky>
			<Main></Main>
			<List></List>
			<Advertisement></Advertisement>
			<Slider></Slider>
			<Pull></Pull>
			<Langbtn></Langbtn>
		</view>
	</cl-page>
</template>

<script lang="ts" setup>
import { useApp, useCool, module } from "/@/cool";
import { useUi } from "/$/cool-ui";
import Topbar from "./components/topbar.vue";
import Main from "./components/map.vue";
import List from "./components/list.vue";
import Advertisement from "./components/advertisement.vue";
import Slider from "./components/sidebar.vue";
import Pull from "./components/pull.vue";
import Langbtn from "@/components/lang-btn.vue";
import { onPageScroll, onReady } from "@dcloudio/uni-app";
import { ref, reactive } from "vue";
import { useIndexStore } from "./store/index";
import { storage } from "/@/cool/utils";
const indexStore = useIndexStore();
const { router, service } = useCool();
const ui = useUi();
const app = useApp();

onReady(() => {
	// const advertisement = storage.get("advertisement");
	// if (!advertisement) {
	// 	indexStore.data.advertisement_show = true;
	// 	storage.set("advertisement", true);
	// }
	// getLocation();
});

const getLocation = () => {
	uni.getLocation({
		type: "wgs84",
		success: function (res) {
			console.log("当前位置的经度：" + res.longitude);
			console.log("当前位置的纬度：" + res.latitude);
		},
		fail: (e) => {
			console.log(e);
		},
	});
};
</script>

<style lang="scss" scoped></style>
